//
//  YTKBaseRequest+BJNetWork.m
//  BaoJunNewEnergy
//
//  Created by 9s on 2018/3/20.
//  Copyright © 2018年 SIXECO. All rights reserved.
//

#import "YTKBaseRequest+BJNetWork.h"

@implementation YTKBaseRequest (BJNetWork)

- (void)startRequestBlockWithSuccess:(SuccessRequeset)success failure:(FailureRequeset)failure{
    [self startWithCompletionBlockWithSuccess:^(__kindof YTKBaseRequest * _Nonnull request) {
#if DEBUG
        NSLog(@"request:%@",request);
#endif
        success(request.responseObject);
    } failure:^(__kindof YTKBaseRequest * _Nonnull request) {
#if DEBUG
        NSLog(@"request:%@",request.error);
#endif
        failure(request.error);
    }];
}

@end
